package semaphores;

import train.Train;

public class Bleu implements State { 

	private static final Bleu instance = new Bleu();
	
	/**
	 * Private constructor prevents instantiation from other classes
	 */
	private Bleu() {}
	
	/**
	 * 
	 * @return Return the unique instance of this class
	 */
	public final static Bleu getInstance() {
	    return instance;
	}
	
    /**
     * Set the train's speed 
     * 
     * @param unTrain The train which see the semaphore
     */
    public void actionOnTrain(Train unTrain) {
   		unTrain.setCurrentSpeed(unTrain.getMaxSpeed());
    }
    
    public String toString() {
    	return "Je suis un feu bleu";
    }
}